package in.abip.chisame.model;

import in.abip.chisame.R;

/**
 * Mood record.
 * 
 * @author Julot.
 * @since Tuesday, January 25th, 2011.
 */
public class Mood extends CActiveRecord implements IListItem {
	public Integer roomId = null;
	public Integer typeId = null;
	public String name = null;
	
	public static Mood model() {
		return new Mood();
	}
	
	public String getTypeName() {
		switch (typeId) {
		case 1: return "Default";
		case 2: return "Listen to Music";
		case 3: return "Relax";
		case 4: return "Watch Movie";
		case 5: return "Watch TV";
		case 6: return "Romantic";
		case 7: return "Meeting";
		default: return "Presentation";
	    }
	}
	
	public int getListIconResource() {
		switch (typeId) {
		case 1: return R.drawable.ic_list_mood_type_1;
		case 2: return R.drawable.ic_list_mood_type_2;
		case 3: return R.drawable.ic_list_mood_type_3;
		case 4: return R.drawable.ic_list_mood_type_4;
		case 5: return R.drawable.ic_list_mood_type_5;
		case 6: return R.drawable.ic_list_mood_type_6;
		case 7: return R.drawable.ic_list_mood_type_7;
		default: return R.drawable.ic_list_mood_type_8;
	    }
	}

	public String getListText() {
		return ((name == null) || (name.equals(""))) ? getTypeName() : name;
	}
}
